<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacesyslog4cj.html">syslog4cj</a></li><li class="navelem"><a class="el" href="namespacesyslog4cj_1_1impl.html">impl</a></li><li class="navelem"><a class="el" href="namespacesyslog4cj_1_1impl_1_1message.html">message</a></li><li class="navelem"><a class="el" href="namespacesyslog4cj_1_1impl_1_1message_1_1modifier.html">modifier</a></li><li class="navelem"><a class="el" href="namespacesyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac.html">mac</a></li><li class="navelem"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html">MacSyslogMessageModifier</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier Class Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.png" usemap="#syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier_map" alt=""/>
  <map id="syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier_map" name="syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier_map">
<area href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html" alt="syslog4cj.impl.message.modifier.AbstractSyslogMessageModifier" shape="rect" coords="0,56,385,80"/>
<area href="interfacesyslog4cj_1_1common_1_1SyslogMessageModifierIF.html" alt="syslog4cj.common.SyslogMessageModifierIF" shape="rect" coords="0,0,385,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6268542c56a1f6b16c34fcf2118d4e67"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a6268542c56a1f6b16c34fcf2118d4e67">init</a> (<a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifierConfig.html">MacSyslogMessageModifierConfig</a> config)</td></tr>
<tr class="separator:a6268542c56a1f6b16c34fcf2118d4e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae991012c717e250494359036ef923b09"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#ae991012c717e250494359036ef923b09">createHmacSHA1</a> (Array&lt; UInt8 &gt; key)</td></tr>
<tr class="separator:ae991012c717e250494359036ef923b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaad940909ed7c9a9cc1da05183ed3b7f"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#aaad940909ed7c9a9cc1da05183ed3b7f">createHmacSHA1</a> (String base64Key)</td></tr>
<tr class="separator:aaad940909ed7c9a9cc1da05183ed3b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab465edd377ced0098c6ffc688a2451da"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#ab465edd377ced0098c6ffc688a2451da">createHmacSHA256</a> (Array&lt; UInt8 &gt; key)</td></tr>
<tr class="separator:ab465edd377ced0098c6ffc688a2451da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20ef51e0a9413ef6b647ce03b954d73c"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a20ef51e0a9413ef6b647ce03b954d73c">createHmacSHA256</a> (String base64Key)</td></tr>
<tr class="separator:a20ef51e0a9413ef6b647ce03b954d73c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a8ba8395edfc77c01460a66bb9403b7"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a6a8ba8395edfc77c01460a66bb9403b7">createHmacSHA512</a> (Array&lt; UInt8 &gt; key)</td></tr>
<tr class="separator:a6a8ba8395edfc77c01460a66bb9403b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39e6797fe9db7f6720e3d362e458ebc7"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a39e6797fe9db7f6720e3d362e458ebc7">createHmacSHA512</a> (String base64Key)</td></tr>
<tr class="separator:a39e6797fe9db7f6720e3d362e458ebc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af49176bfdab3f7e9b9a9cd72a3588ac1"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#af49176bfdab3f7e9b9a9cd72a3588ac1">createHmacMD5</a> (Array&lt; UInt8 &gt; key)</td></tr>
<tr class="separator:af49176bfdab3f7e9b9a9cd72a3588ac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01f360137848db49af8ccf393391adb4"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a01f360137848db49af8ccf393391adb4">createHmacMD5</a> (String base64Key)</td></tr>
<tr class="separator:a01f360137848db49af8ccf393391adb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a466728b02edfd832296aa310b1418720"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a466728b02edfd832296aa310b1418720">getConfig</a> ()</td></tr>
<tr class="separator:a466728b02edfd832296aa310b1418720"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae35a59255ff7e1063698d5fe4f843806"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#ae35a59255ff7e1063698d5fe4f843806">modify</a> (<a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogIF.html">SyslogIF</a> syslog, Int64 facility, Int64 level, String message)</td></tr>
<tr class="separator:ae35a59255ff7e1063698d5fe4f843806"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d3d6c419a4e359ef41296b91fda9d9a"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a9d3d6c419a4e359ef41296b91fda9d9a">verify</a> (String message, String base64Signature)</td></tr>
<tr class="separator:a9d3d6c419a4e359ef41296b91fda9d9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44d943d80ea708f6b20357444164f72f"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a44d943d80ea708f6b20357444164f72f">verify</a> (String message, Array&lt; UInt8 &gt; signature)</td></tr>
<tr class="separator:a44d943d80ea708f6b20357444164f72f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html">syslog4cj.impl.message.modifier.AbstractSyslogMessageModifier</a></td></tr>
<tr class="memitem:a87ccc9fd1c4dd21e0e474e10a228afdd inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html#a87ccc9fd1c4dd21e0e474e10a228afdd">init</a> (<a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogMessageModifierConfigIF.html">SyslogMessageModifierConfigIF</a> messageModifierConfig)</td></tr>
<tr class="separator:a87ccc9fd1c4dd21e0e474e10a228afdd inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6157a58046be6df0826f6f172ace10a inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html#ab6157a58046be6df0826f6f172ace10a">parseModifier</a> (String message, String prefix, String suffix)</td></tr>
<tr class="separator:ab6157a58046be6df0826f6f172ace10a inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae33a9b5d876e7825e6b7786a46fa7a2c inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html#ae33a9b5d876e7825e6b7786a46fa7a2c">parseInlineModifier</a> (String message)</td></tr>
<tr class="separator:ae33a9b5d876e7825e6b7786a46fa7a2c inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f78854c2447ab958d907113a88c034a inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html#a9f78854c2447ab958d907113a88c034a">verify</a> (String message):Bool</td></tr>
<tr class="separator:a9f78854c2447ab958d907113a88c034a inherit pub_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f65d76f12bd3b028d7fefb6d1b9a111"><td class="memItemLeft" align="right" valign="top">func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogMessageModifierIF.html#a8f65d76f12bd3b028d7fefb6d1b9a111">modify</a> (<a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogIF.html">SyslogIF</a> syslog, Int64 facility, Int64 level, String message):String</td></tr>
<tr class="separator:a8f65d76f12bd3b028d7fefb6d1b9a111"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a581a1f2aee3c0fbd34270775e1aab851"><td class="memItemLeft" align="right" valign="top">func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogMessageModifierIF.html#a581a1f2aee3c0fbd34270775e1aab851">verify</a> (String message):Bool</td></tr>
<tr class="separator:a581a1f2aee3c0fbd34270775e1aab851"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a88cbdc85844973c27281d5e8b8b4d45c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a88cbdc85844973c27281d5e8b8b4d45c">let config</a> : <a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifierConfig.html">MacSyslogMessageModifierConfig</a></td></tr>
<tr class="separator:a88cbdc85844973c27281d5e8b8b4d45c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bf4264ca4451c0b72ebcb19906340a4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a3bf4264ca4451c0b72ebcb19906340a4">let hmac</a> : HMAC</td></tr>
<tr class="separator:a3bf4264ca4451c0b72ebcb19906340a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39372dbef66cfe25956f21d8aaa876c1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifier.html#a39372dbef66cfe25956f21d8aaa876c1">let lock</a> = ReentrantMutex()</td></tr>
<tr class="separator:a39372dbef66cfe25956f21d8aaa876c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html">syslog4cj.impl.message.modifier.AbstractSyslogMessageModifier</a></td></tr>
<tr class="memitem:aebd8c9339bfc42a7f2d1bb27d746e95b inherit pro_attribs_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html#aebd8c9339bfc42a7f2d1bb27d746e95b">var messageModifierConfig</a> : <a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogMessageModifierConfigIF.html">SyslogMessageModifierConfigIF</a></td></tr>
<tr class="separator:aebd8c9339bfc42a7f2d1bb27d746e95b inherit pro_attribs_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html">syslog4cj.impl.message.modifier.AbstractSyslogMessageModifier</a></td></tr>
<tr class="memitem:a29538dbc79c30c0f36dda70cf618618a inherit pro_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memItemLeft" align="right" valign="top">protected func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier.html#a29538dbc79c30c0f36dda70cf618618a">verify</a> (String message, String modifier):Bool</td></tr>
<tr class="separator:a29538dbc79c30c0f36dda70cf618618a inherit pro_methods_classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1AbstractSyslogMessageModifier"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>基于 HMAC 的 Syslog 消息认证修饰器<br  />
 为日志消息添加消息认证码（MAC），提供消息完整性和真实性验证， 防止日志在传输过程中被篡改。 </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a6268542c56a1f6b16c34fcf2118d4e67" name="a6268542c56a1f6b16c34fcf2118d4e67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6268542c56a1f6b16c34fcf2118d4e67">&#9670;&#160;</a></span>init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.init </td>
          <td>(</td>
          <td class="paramname"><em>config</em>:&#160;</td>
          <td class="paramtype">MacSyslogMessageModifierConfig</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>使用指定配置创建修饰器</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>HMAC 算法和密钥配置 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af49176bfdab3f7e9b9a9cd72a3588ac1" name="af49176bfdab3f7e9b9a9cd72a3588ac1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af49176bfdab3f7e9b9a9cd72a3588ac1">&#9670;&#160;</a></span>createHmacMD5() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacMD5 </td>
          <td>(</td>
          <td class="paramname"><em>key</em>:&#160;</td>
          <td class="paramtype">Array&lt;UInt8&gt;</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-MD5 修饰器（原始密钥字节）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>原始密钥字节数组 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a01f360137848db49af8ccf393391adb4" name="a01f360137848db49af8ccf393391adb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01f360137848db49af8ccf393391adb4">&#9670;&#160;</a></span>createHmacMD5() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacMD5 </td>
          <td>(</td>
          <td class="paramname"><em>base64Key</em>:&#160;</td>
          <td class="paramtype">String</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-MD5 修饰器（Base64密钥）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base64Key</td><td>Base64编码的密钥字符串 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae991012c717e250494359036ef923b09" name="ae991012c717e250494359036ef923b09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae991012c717e250494359036ef923b09">&#9670;&#160;</a></span>createHmacSHA1() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacSHA1 </td>
          <td>(</td>
          <td class="paramname"><em>key</em>:&#160;</td>
          <td class="paramtype">Array&lt;UInt8&gt;</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-SHA1 修饰器（原始密钥字节）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>原始密钥字节数组 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aaad940909ed7c9a9cc1da05183ed3b7f" name="aaad940909ed7c9a9cc1da05183ed3b7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaad940909ed7c9a9cc1da05183ed3b7f">&#9670;&#160;</a></span>createHmacSHA1() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacSHA1 </td>
          <td>(</td>
          <td class="paramname"><em>base64Key</em>:&#160;</td>
          <td class="paramtype">String</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-SHA1 修饰器（Base64密钥）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base64Key</td><td>Base64编码的密钥字符串 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab465edd377ced0098c6ffc688a2451da" name="ab465edd377ced0098c6ffc688a2451da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab465edd377ced0098c6ffc688a2451da">&#9670;&#160;</a></span>createHmacSHA256() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacSHA256 </td>
          <td>(</td>
          <td class="paramname"><em>key</em>:&#160;</td>
          <td class="paramtype">Array&lt;UInt8&gt;</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-SHA256 修饰器（原始密钥字节）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>原始密钥字节数组 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a20ef51e0a9413ef6b647ce03b954d73c" name="a20ef51e0a9413ef6b647ce03b954d73c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20ef51e0a9413ef6b647ce03b954d73c">&#9670;&#160;</a></span>createHmacSHA256() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacSHA256 </td>
          <td>(</td>
          <td class="paramname"><em>base64Key</em>:&#160;</td>
          <td class="paramtype">String</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-SHA256 修饰器（Base64密钥）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base64Key</td><td>Base64编码的密钥字符串 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6a8ba8395edfc77c01460a66bb9403b7" name="a6a8ba8395edfc77c01460a66bb9403b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a8ba8395edfc77c01460a66bb9403b7">&#9670;&#160;</a></span>createHmacSHA512() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacSHA512 </td>
          <td>(</td>
          <td class="paramname"><em>key</em>:&#160;</td>
          <td class="paramtype">Array&lt;UInt8&gt;</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-SHA512 修饰器（原始密钥字节）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>原始密钥字节数组 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a39e6797fe9db7f6720e3d362e458ebc7" name="a39e6797fe9db7f6720e3d362e458ebc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39e6797fe9db7f6720e3d362e458ebc7">&#9670;&#160;</a></span>createHmacSHA512() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public static func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.createHmacSHA512 </td>
          <td>(</td>
          <td class="paramname"><em>base64Key</em>:&#160;</td>
          <td class="paramtype">String</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 HMAC-SHA512 修饰器（Base64密钥）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base64Key</td><td>Base64编码的密钥字符串 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a466728b02edfd832296aa310b1418720" name="a466728b02edfd832296aa310b1418720"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a466728b02edfd832296aa310b1418720">&#9670;&#160;</a></span>getConfig()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.getConfig </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取当前配置</p>
<dl class="section return"><dt>Returns</dt><dd>HMAC算法配置实例 </dd></dl>

</div>
</div>
<a id="ae35a59255ff7e1063698d5fe4f843806" name="ae35a59255ff7e1063698d5fe4f843806"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae35a59255ff7e1063698d5fe4f843806">&#9670;&#160;</a></span>modify()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.modify </td>
          <td>(</td>
          <td class="paramname"><em>syslog</em>:&#160;</td>
          <td class="paramtype">SyslogIF, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>facility</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>level</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">String&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>修改日志消息：附加HMAC认证码</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">syslog</td><td>Syslog实例 </td></tr>
    <tr><td class="paramname">facility</td><td>设施类型 </td></tr>
    <tr><td class="paramname">level</td><td>日志级别 </td></tr>
    <tr><td class="paramname">message</td><td>原始日志消息 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>附加HMAC后的消息（格式：原始消息 + 前缀 + Base64(MAC) + 后缀）</dd></dl>
<dl class="section note"><dt>Note</dt><dd>线程安全：使用互斥锁保护HMAC计算过程 </dd></dl>

<p>Implements <a class="el" href="interfacesyslog4cj_1_1common_1_1SyslogMessageModifierIF.html#a8f65d76f12bd3b028d7fefb6d1b9a111">syslog4cj.common.SyslogMessageModifierIF</a>.</p>

</div>
</div>
<a id="a44d943d80ea708f6b20357444164f72f" name="a44d943d80ea708f6b20357444164f72f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44d943d80ea708f6b20357444164f72f">&#9670;&#160;</a></span>verify() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.verify </td>
          <td>(</td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>signature</em>:&#160;</td>
          <td class="paramtype">Array&lt;UInt8&gt;&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>验证消息完整性（原始字节MAC版本）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>原始日志消息（不含MAC部分） </td></tr>
    <tr><td class="paramname">signature</td><td>原始MAC字节数组 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>验证结果（true=MAC匹配）</dd></dl>
<dl class="section note"><dt>Note</dt><dd>线程安全：使用互斥锁保护HMAC计算过程 </dd></dl>

</div>
</div>
<a id="a9d3d6c419a4e359ef41296b91fda9d9a" name="a9d3d6c419a4e359ef41296b91fda9d9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d3d6c419a4e359ef41296b91fda9d9a">&#9670;&#160;</a></span>verify() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.verify </td>
          <td>(</td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>base64Signature</em>:&#160;</td>
          <td class="paramtype">String&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>验证消息完整性（Base64 MAC版本）</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>原始日志消息（不含MAC部分） </td></tr>
    <tr><td class="paramname">base64Signature</td><td>Base64编码的MAC值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>验证结果（true=MAC匹配）</dd></dl>
<dl class="section note"><dt>Note</dt><dd>线程安全：使用互斥锁保护HMAC计算过程 </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a88cbdc85844973c27281d5e8b8b4d45c" name="a88cbdc85844973c27281d5e8b8b4d45c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88cbdc85844973c27281d5e8b8b4d45c">&#9670;&#160;</a></span>let config</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.let config : <a class="el" href="classsyslog4cj_1_1impl_1_1message_1_1modifier_1_1mac_1_1MacSyslogMessageModifierConfig.html">MacSyslogMessageModifierConfig</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>HMAC 算法配置 </p>

</div>
</div>
<a id="a3bf4264ca4451c0b72ebcb19906340a4" name="a3bf4264ca4451c0b72ebcb19906340a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bf4264ca4451c0b72ebcb19906340a4">&#9670;&#160;</a></span>let hmac</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.let hmac : HMAC</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>HMAC 计算实例 </p>

</div>
</div>
<a id="a39372dbef66cfe25956f21d8aaa876c1" name="a39372dbef66cfe25956f21d8aaa876c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39372dbef66cfe25956f21d8aaa876c1">&#9670;&#160;</a></span>let lock</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">syslog4cj.impl.message.modifier.mac.MacSyslogMessageModifier.let lock = ReentrantMutex()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>线程安全互斥锁（HMAC 实例通常非线程安全） </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/impl/message/modifier/mac/<a class="el" href="mac__syslog__message__modifier_8cj.html">mac_syslog_message_modifier.cj</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
</small></address>
</body>
</html>
